﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using OgilvyOne.UKNow.IDAL;
using OgilvyOne.UKNow.DAL;
using OgilvyOne.UKNow.Globalization;

namespace OgilvyOne.UKNow.DALFactory
{
    public class MemberDALFactory
    {
        public static readonly IDALMember ChineseEventsDAL = new MemberDAL(LanguageType.cn);
        public static readonly IDALMember EnglishEventsDAL = new MemberDAL(LanguageType.en);

        public static IDALMember Create(int langID)
        {
            if (((LanguageType)Enum.Parse(typeof(LanguageType), langID.ToString())) == LanguageType.cn)
                return ChineseEventsDAL;
            else
                return EnglishEventsDAL;
        }


        //public static readonly IDALMember MemberDAL = new MemberDAL();

        //public static IDALMember Create()
        //{
        //    return MemberDAL;
        //}
    }
}
